package com.content.scaffold.common.constants;


import com.content.scaffold.common.web.RequestContext;

import java.util.ArrayList;
import java.util.List;

public class DemoConstants {

    public static List<String> tenantIgnoreTable = new ArrayList<>();

    static {
        tenantIgnoreTable.add("office");
        tenantIgnoreTable.add("sys_user");
        tenantIgnoreTable.add("sys_menu");
        tenantIgnoreTable.add("sys_role");
        tenantIgnoreTable.add("sys_office_role");
        tenantIgnoreTable.add("sys_role_menu");
        tenantIgnoreTable.add("sys_user_role");

    }

    public static final String ADMIN_USER_NAME ="admin";

    public static boolean isAdmin(){
        String loginName = RequestContext.getRequestInfo().getUserName();
        return ADMIN_USER_NAME.equals(loginName);
    }
}
